package com.itheima.demo;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class UpdateDemo01 {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");

        Connection conn = DriverManager.getConnection("jdbc:mysql://192.168.31.129:3306/demo3","root","root");

        Statement st = conn.createStatement();

        //st.executeUpdate("INSERT INTO stu(id, name, phone) VALUES (NULL, '李四','13657596013') ");
        st.executeUpdate("delete from stu where id=2  ");

        //conn.commit();
        st.close();
        conn.close();


    }
}
